#pragma once
#include "Enemy.h"

class Goblin : public Enemy
{
public:
	Goblin();
	virtual ~Goblin() = default;

	/**********************************************************/
	// Interface:
	//	- virtual functions for children classes to override
	virtual void	Update(float elapsedTime)		override;

	//	virtual SGD::Rectangle GetRect(void)	const			override;
	virtual int		GetType(void)	const			override	{ return OBJ_ENEMY; }
	virtual void	HandleCollision(GameObject* pOther)	override;
	virtual void	HandleEvent(const SGD::Event* pEvent) override;
	virtual int		GetEnemyType()	const { return ENEMY_GOBLIN; }

	virtual bool DoAttack();
	virtual void Attack();

	void SetCanSpawnFriends(bool set) { canSpawnFriends = set; }

	virtual void EnterIdle();
	virtual void EnterPatrol();
	virtual void EnterJumping();
	virtual void EnterCloseIn();
	virtual void EnterAttack();
	virtual void EnterDead();

	bool angry = false;
private:
	bool canSpawnFriends = true;
	bool hit = false;

	//Cooldowns
	float callTimer = 0.0f;
};

